大米星球[V2].js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. var rule = {
  2. title: '大米星球[V2]', // csp_AppYsV2
  3. host:'https://www.dmxq.vip',
  4. hostJs:'print(HOST);let html=request(HOST,{headers:{"User-Agent":PC_UA}});let src=jsp.pdfh(html,"ul&&li:eq(1)&&a&&href");print(src);HOST=src+"/api.php/app/"',
  5. url: 'video?tid=fyclassfyfilter&limit=20&pg=fypage',
  6. filter_url:'&class={{fl.class}}&area={{fl.area}}&lang={{fl.lang}}&letter={{fl.letter}}&year={{fl.year}}&by={{fl.by}}',
  7. filter: {
  8. "20":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"Netflix","v":"Netflix"},{"n":"仙侠","v":"仙侠"},{"n":"剧情","v":"剧情"},{"n":"科幻","v":"科幻"},{"n":"动作","v":"动作"},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"冒险","v":"冒险"},{"n":"儿童","v":"儿童"},{"n":"歌舞","v":"歌舞"},{"n":"音乐","v":"音乐"},{"n":"奇幻","v":"奇幻"},{"n":"动画","v":"动画"},{"n":"恐怖","v":"恐怖"},{"n":"惊悚","v":"惊悚"},{"n":"丧尸","v":"丧尸"},{"n":"战争","v":"战争"},{"n":"传记","v":"传记"},{"n":"纪录","v":"纪录"},{"n":"犯罪","v":"犯罪"},{"n":"悬疑","v":"悬疑"},{"n":"西部","v":"西部"},{"n":"灾难","v":"灾难"},{"n":"古装","v":"古装"},{"n":"武侠","v":"武侠"},{"n":"家庭","v":"家庭"},{"n":"短片","v":"短片"},{"n":"校园","v":"校园"},{"n":"文艺","v":"文艺"},{"n":"运动","v":"运动"},{"n":"青春","v":"青春"},{"n":"同性","v":"同性"},{"n":"励志","v":"励志"},{"n":"人性","v":"人性"},{"n":"美食","v":"美食"},{"n":"女性","v":"女性"},{"n":"治愈","v":"治愈"},{"n":"历史","v":"历史"},{"n":"真人秀","v":"真人秀"},{"n":"脱口秀","v":"脱口秀"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"美国","v":"美国"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"英国","v":"英国"},{"n":"法国","v":"法国"},{"n":"德国","v":"德国"},{"n":"印度","v":"印度"},{"n":"泰国","v":"泰国"},{"n":"丹麦","v":"丹麦"},{"n":"瑞典","v":"瑞典"},{"n":"巴西","v":"巴西"},{"n":"加拿大","v":"加拿大"},{"n":"俄罗斯","v":"俄罗斯"},{"n":"意大利","v":"意大利"},{"n":"比利时","v":"比利时"},{"n":"爱尔兰","v":"爱尔兰"},{"n":"西班牙","v":"西班牙"},{"n":"澳大利亚","v":"澳大利亚"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"英语","v":"英语"},{"n":"法语","v":"法语"},{"n":"国语","v":"国语"},{"n":"粤语","v":"粤语"},{"n":"日语","v":"日语"},{"n":"韩语","v":"韩语"},{"n":"泰语","v":"泰语"},{"n":"德语","v":"德语"},{"n":"俄语","v":"俄语"},{"n":"闽南语","v":"闽南语"},{"n":"丹麦语","v":"丹麦语"},{"n":"波兰语","v":"波兰语"},{"n":"瑞典语","v":"瑞典语"},{"n":"印地语","v":"印地语"},{"n":"挪威语","v":"挪威语"},{"n":"意大利语","v":"意大利语"},{"n":"西班牙语","v":"西班牙语"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"}]}],
  9. "21":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"Netflix","v":"Netflix"},{"n":"剧情","v":"剧情"},{"n":"丧尸","v":"丧尸"},{"n":"仙侠","v":"仙侠"},{"n":"穿越","v":"穿越"},{"n":"惊悚","v":"惊悚"},{"n":"恐怖","v":"恐怖"},{"n":"言情","v":"言情"},{"n":"科幻","v":"科幻"},{"n":"动作","v":"动作"},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"偶像","v":"偶像"},{"n":"都市","v":"都市"},{"n":"军旅","v":"军旅"},{"n":"谍战","v":"谍战"},{"n":"罪案","v":"罪案"},{"n":"宫廷","v":"宫廷"},{"n":"冒险","v":"冒险"},{"n":"儿童","v":"儿童"},{"n":"歌舞","v":"歌舞"},{"n":"音乐","v":"音乐"},{"n":"奇幻","v":"奇幻"},{"n":"动画","v":"动画"},{"n":"战争","v":"战争"},{"n":"传记","v":"传记"},{"n":"记录","v":"记录"},{"n":"犯罪","v":"犯罪"},{"n":"悬疑","v":"悬疑"},{"n":"西部","v":"西部"},{"n":"灾难","v":"灾难"},{"n":"古装","v":"古装"},{"n":"武侠","v":"武侠"},{"n":"家庭","v":"家庭"},{"n":"短片","v":"短片"},{"n":"校园","v":"校园"},{"n":"文艺","v":"文艺"},{"n":"运动","v":"运动"},{"n":"青春","v":"青春"},{"n":"同性","v":"同性"},{"n":"励志","v":"励志"},{"n":"人性","v":"人性"},{"n":"美食","v":"美食"},{"n":"女性","v":"女性"},{"n":"治愈","v":"治愈"},{"n":"历史","v":"历史"},{"n":"真人秀","v":"真人秀"},{"n":"脱口秀","v":"脱口秀"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"美国","v":"美国"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"英国","v":"英国"},{"n":"法国","v":"法国"},{"n":"德国","v":"德国"},{"n":"印度","v":"印度"},{"n":"泰国","v":"泰国"},{"n":"丹麦","v":"丹麦"},{"n":"瑞典","v":"瑞典"},{"n":"巴西","v":"巴西"},{"n":"加拿大","v":"加拿大"},{"n":"俄罗斯","v":"俄罗斯"},{"n":"意大利","v":"意大利"},{"n":"比利时","v":"比利时"},{"n":"爱尔兰","v":"爱尔兰"},{"n":"西班牙","v":"西班牙"},{"n":"澳大利亚","v":"澳大利亚"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"英语","v":"英语"},{"n":"法语","v":"法语"},{"n":"国语","v":"国语"},{"n":"粤语","v":"粤语"},{"n":"日语","v":"日语"},{"n":"韩语","v":"韩语"},{"n":"泰语","v":"泰语"},{"n":"德语","v":"德语"},{"n":"俄语","v":"俄语"},{"n":"闽南语","v":"闽南语"},{"n":"丹麦语","v":"丹麦语"},{"n":"波兰语","v":"波兰语"},{"n":"瑞典语","v":"瑞典语"},{"n":"印地语","v":"印地语"},{"n":"挪威语","v":"挪威语"},{"n":"意大利语","v":"意大利语"},{"n":"西班牙语","v":"西班牙语"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"}]}],
  10. "22":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"Netflix","v":"Netflix"},{"n":"热血","v":"热血"},{"n":"科幻","v":"科幻"},{"n":"美少女","v":"美少女"},{"n":"魔幻","v":"魔幻"},{"n":"经典","v":"经典"},{"n":"励志","v":"励志"},{"n":"少儿","v":"少儿"},{"n":"冒险","v":"冒险"},{"n":"搞笑","v":"搞笑"},{"n":"推理","v":"推理"},{"n":"恋爱","v":"恋爱"},{"n":"治愈","v":"治愈"},{"n":"幻想","v":"幻想"},{"n":"校园","v":"校园"},{"n":"动物","v":"动物"},{"n":"机战","v":"机战"},{"n":"亲子","v":"亲子"},{"n":"儿歌","v":"儿歌"},{"n":"运动","v":"运动"},{"n":"悬疑","v":"悬疑"},{"n":"怪物","v":"怪物"},{"n":"战争","v":"战争"},{"n":"益智","v":"益智"},{"n":"青春","v":"青春"},{"n":"童话","v":"童话"},{"n":"竞技","v":"竞技"},{"n":"动作","v":"动作"},{"n":"社会","v":"社会"},{"n":"友情","v":"友情"},{"n":"真人版","v":"真人版"},{"n":"电影版","v":"电影版"},{"n":"OVA版","v":"OVA版"},{"n":"TV版","v":"TV版"},{"n":"新番动画","v":"新番动画"},{"n":"完结动画","v":"完结动画"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"},{"n":"其他","v":"其他"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"更早","v":"更早"}]}],
  11. "23":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"YouTube","v":"YouTube"},{"n":"脱口秀","v":"脱口秀"},{"n":"真人秀","v":"真人秀"},{"n":"选秀","v":"选秀"},{"n":"八卦","v":"八卦"},{"n":"访谈","v":"访谈"},{"n":"情感","v":"情感"},{"n":"生活","v":"生活"},{"n":"晚会","v":"晚会"},{"n":"搞笑","v":"搞笑"},{"n":"音乐","v":"音乐"},{"n":"时尚","v":"时尚"},{"n":"游戏","v":"游戏"},{"n":"少儿","v":"少儿"},{"n":"体育","v":"体育"},{"n":"纪实","v":"纪实"},{"n":"科教","v":"科教"},{"n":"曲艺","v":"曲艺"},{"n":"歌舞","v":"歌舞"},{"n":"财经","v":"财经"},{"n":"汽车","v":"汽车"},{"n":"播报","v":"播报"},{"n":"其他","v":"其他"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"韩国","v":"韩国"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"美国","v":"美国"},{"n":"其它","v":"其它"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"}]}]
  12. },
  13. detailUrl:'/detail?vod_id=fyid',
  14. searchUrl: '/search?text=**&pg=fypage',
  15. searchable: 2,
  16. quickSearch: 0,
  17. filterable:1,//是否启用分类筛选,
  18. // headers:{'User-Agent':'Dart/2.14 (dart:io)'},
  19. headers:{'User-Agent':'okhttp/4.1.0'},
  20. timeout:5000,
  21. // 分类筛选 /api.php/app/nav || /xgapp.php/v1/nav || /api.php/v1.vod/types
  22. class_name:'电影&电视剧&动漫&综艺',
  23. class_url:'20&21&22&23',
  24. play_parse:true,
  25. lazy:`js:
  26. let play_Url = '';
  27. if (/\\.m3u8|\\.mp4/.test(input)) {
  28. input = {
  29. jx: 0,
  30. url: input,
  31. parse: 0
  32. }
  33. } else if (/,/.test(input) && /url=/.test(input)) {
  34. input = input.split('url=');
  35. play_Url = input[0].split(',')[0];
  36. input = {
  37. jx: 0,
  38. url: input[1],
  39. playUrl: play_Url,
  40. parse: 1
  41. }
  42. } else if (/url=|id=/.test(input)) {
  43. input = {
  44. jx: 0,
  45. url: JSON.parse(request(input)).url,
  46. parse: 0
  47. }
  48. } else if (/youku|iqiyi|v\\.qq\\.com|pptv|sohu|le\\.com|1905\\.com|mgtv|bilibili|ixigua/.test(input)) {
  49. play_Url = /bilibili/.test(input) ? 'https://jx.xmflv.com/?url=' : 'https://jx.777jiexi.com/player/?url='; // type0的parse
  50. // play_Url = /bilibili/.test(input) ? 'https://jx.xmflv.com/?url=' : 'json:http://pandown.pro/app/kkdy.php?url='; // type1的parse可加'json:'直接解析url (除了蜂蜜的'影视TV',其它的壳皆可用)
  51. input = {
  52. jx: 0,
  53. url: input,
  54. playUrl: play_Url,
  55. parse: 1,
  56. header: JSON.stringify({
  57. 'user-agent': 'Mozilla/5.0',
  58. }),
  59. }
  60. } else {
  61. input
  62. }
  63. `,
  64. limit:6,
  65. // 图片来源:'@Referer=https://api.douban.com/@User-Agent=Mozilla/5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/113.0.0.0%20Safari/537.36',
  66. 推荐:`js:
  67. let d = [];
  68. let jsondata = [];
  69. let videoList = [];
  70. if (/v1\\.vod/.test(HOST)) {
  71. if(HOST.endsWith('/')){
  72. jsondata = JSON.parse(request(HOST + 'vodPhbAll'));
  73. } else {
  74. jsondata = JSON.parse(request(HOST + '/vodPhbAll'));
  75. }
  76. videoList = jsondata.data.list[0].vod_list;
  77. } else {
  78. if(HOST.endsWith('/')){
  79. jsondata = JSON.parse(request(HOST + 'index_video'));
  80. } else {
  81. jsondata = JSON.parse(request(HOST + '/index_video'));
  82. }
  83. videoList = /xgapp/.test(HOST)?jsondata.data[0].vlist:jsondata.list[0].vlist;
  84. }
  85. // log('videoList =========> '+stringify(videoList));
  86. videoList.forEach(it => {
  87. d.push({
  88. url:it.vod_id,
  89. title:it.vod_name,
  90. img:it.vod_pic.startsWith('https') ? it.vod_pic : it.vod_pic.startsWith('http') ? it.vod_pic.replace('http','https') : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  91. desc:it.vod_remarks,
  92. });
  93. });
  94. setResult(d);
  95. `,
  96. 一级:`js:
  97. let d = [];
  98. let jsondata = [];
  99. let videoList = [];
  100. if (/v1\\.vod/.test(HOST)) {
  101. input = input.replace('video','v1.vod').replace('tid','type').replace('pg=','page=');
  102. jsondata = JSON.parse(request(input));
  103. videoList = jsondata.data.list;
  104. } else {
  105. input = HOST + '/'+ input.split('/')[4];
  106. jsondata = JSON.parse(request(input));
  107. videoList = jsondata.list || jsondata.data;
  108. }
  109. // log('videoList =========> '+stringify(videoList));
  110. videoList.forEach(it => {
  111. d.push({
  112. url:it.vod_id,
  113. title:it.vod_name,
  114. img:it.vod_pic.startsWith('https') ? it.vod_pic : it.vod_pic.startsWith('http') ? it.vod_pic.replace('http','https') : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  115. desc:it.vod_remarks,
  116. });
  117. });
  118. setResult(d);
  119. `,
  120. 二级:`js:
  121. if (/v1\\.vod/.test(HOST)) {
  122. input = HOST + '/'+ input.split('/')[3];
  123. } else {
  124. input = HOST + '/'+ input.split('/')[3].replace('detail','video_detail').replace('vod_id','id');
  125. }
  126. try {
  127. let html = request(input);
  128. html = JSON.parse(html);
  129. let node = /xgapp/.test(HOST) ? html.data.vod_info : html.data;
  130. VOD = {
  131. vod_id: node.vod_id,
  132. vod_name: node.vod_name,
  133. vod_pic: node.vod_pic,
  134. type_name: node.vod_class,
  135. vod_year: node.vod_year,
  136. vod_area: node.vod_area,
  137. vod_remarks: node.vod_remarks,
  138. vod_actor: node.vod_actor,
  139. vod_director: node.vod_director,
  140. vod_content: node.vod_content.strip()
  141. };
  142. if (typeof play_url === 'undefined') {
  143. var play_url = ''
  144. }
  145. var name = {
  146. 'bfzym3u8': '暴风',
  147. '1080zyk': '优质',
  148. 'kuaikan': '快看',
  149. 'lzm3u8': '量子',
  150. 'ffm3u8': '非凡',
  151. 'haiwaikan': '海外看',
  152. 'gsm3u8': '光速',
  153. 'zuidam3u8': '最大',
  154. 'bjm3u8': '八戒',
  155. 'snm3u8': '索尼',
  156. 'wolong': '卧龙',
  157. 'xlm3u8': '新浪',
  158. 'yhm3u8': '樱花',
  159. 'tkm3u8': '天空',
  160. 'jsm3u8': '极速',
  161. 'wjm3u8': '无尽',
  162. 'sdm3u8': '闪电',
  163. 'kcm3u8': '快车',
  164. 'jinyingm3u8': '金鹰',
  165. 'fsm3u8': '飞速',
  166. 'tpm3u8': '淘片',
  167. 'lem3u8': '鱼乐',
  168. 'dbm3u8': '百度',
  169. 'tomm3u8': '番茄',
  170. 'ukm3u8': 'U酷',
  171. 'ikm3u8': '爱坤',
  172. 'hnzym3u8': '红牛资源',
  173. 'hnm3u8': '红牛',
  174. '68zy_m3u8': '68',
  175. 'kdm3u8': '酷点',
  176. 'bdxm3u8': '北斗星',
  177. 'qhm3u8': '奇虎',
  178. 'hhm3u8': '豪华',
  179. 'kbm3u8': '快播'
  180. };
  181. let episodes = /v1\\.vod/.test(HOST)?node.vod_play_list:node.vod_url_with_player;
  182. if (episodes != '') {
  183. let playMap = {};
  184. let arr = [];
  185. episodes.forEach(ep => {
  186. let from = [];
  187. if (/v1\\.vod/.test(HOST)) {
  188. from = ep.player_info.from||ep.player_info.show||ep.from||ep.show;
  189. } else {
  190. from = ep.code||ep.name;
  191. }
  192. if (!playMap.hasOwnProperty(from)) {
  193. playMap[from] = []
  194. }
  195. let parse_api = '';
  196. if (/v1\\.vod/.test(HOST)) {
  197. parse_api = ep.player_info.parse != null ? ep.player_info.parse : ep.player_info.parse2;
  198. // parse_api = /,/.test(parse_api) ? parse_api.split(',')[1] : parse_api;
  199. } else {
  200. parse_api = ep.parse_api;
  201. }
  202. log('parse_api =========> '+parse_api);
  203. if (parse_api != null && !/\\.m3u8|\\.mp4/.test(ep.url)) {
  204. parse_api = parse_api.replaceAll('..','.') ;
  205. ep.url = ep.url.replaceAll('$','$'+parse_api);
  206. }
  207. if (from != null) playMap[from].push(ep.url)
  208. });
  209. for (var key in playMap) {
  210. if ('bfzym3u8' == key) {
  211. arr.push({
  212. flag: name[key],
  213. url: playMap[key],
  214. sort: 1
  215. })
  216. } else if ('1080zyk' == key) {
  217. arr.push({
  218. flag: name[key],
  219. url: playMap[key],
  220. sort: 2
  221. })
  222. } else if ('kuaikan' == key) {
  223. arr.push({
  224. flag: name[key],
  225. url: playMap[key],
  226. sort: 3
  227. })
  228. } else if ('lzm3u8' == key) {
  229. arr.push({
  230. flag: name[key],
  231. url: playMap[key],
  232. sort: 4
  233. })
  234. } else if ('ffm3u8' == key) {
  235. arr.push({
  236. flag: name[key],
  237. url: playMap[key],
  238. sort: 5
  239. })
  240. } else if ('snm3u8' == key) {
  241. arr.push({
  242. flag: name[key],
  243. url: playMap[key],
  244. sort: 6
  245. })
  246. } else if ('qhm3u8' == key) {
  247. arr.push({
  248. flag: name[key],
  249. url: playMap[key],
  250. sort: 7
  251. })
  252. } else {
  253. arr.push({
  254. flag: name[key] ? name[key] : key,
  255. url: playMap[key],
  256. sort: 8
  257. })
  258. }
  259. }
  260. arr.sort((a, b) => a.sort - b.sort);
  261. let playFrom = [];
  262. let playList = [];
  263. arr.map(val => {
  264. if (!/undefined/.test(val.flag)) {
  265. playFrom.push(val.flag);
  266. playList.push(val.url);
  267. }
  268. })
  269. VOD.vod_play_from = playFrom.join('$$$');
  270. VOD.vod_play_url = playList.join('$$$');
  271. } else {
  272. VOD.vod_play_from = node.vod_play_from;
  273. VOD.vod_play_url = node.vod_play_url;
  274. }
  275. } catch (e) {
  276. log("获取二级详情页发生错误:" + e.message);
  277. }
  278. `,
  279. 搜索:`js:
  280. let d = [];
  281. let jsondata = [];
  282. let videoList = [];
  283. if (/v1\\.vod/.test(HOST)) {
  284. input = (HOST + '/'+ input.split('/')[3]).replace('/search','').replace('text=','wd=').replace('pg=','page=');
  285. jsondata = JSON.parse(request(input));
  286. videoList = jsondata.data.list;
  287. } else {
  288. input = HOST + '/'+ input.split('/')[3]
  289. jsondata = JSON.parse(request(input));
  290. videoList = jsondata.list || jsondata.data;
  291. }
  292. // log('videoList =========> '+stringify(videoList));
  293. videoList.forEach(it => {
  294. d.push({
  295. url:it.vod_id,
  296. title:it.vod_name,
  297. img:it.vod_pic.startsWith('https') ? it.vod_pic : it.vod_pic.startsWith('http') ? it.vod_pic.replace('http','https') : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  298. desc:it.vod_remarks,
  299. });
  300. });
  301. setResult(d);
  302. `,
  303. }